package net.angrynut.web.dao.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

import net.angrynut.web.model.entity.User;

/**
 * 可以看到注解可 XML 配置可以混用。
 */
@Mapper
public interface UserMapper {

	User findByUsername(String username);

	@Select("select * from user where id = #{userId}")
	@ResultMap("userMap")
	User findById(Long userId);
}
